<?php

namespace app\admin\model\pes\vehicle;

use app\admin\model\pes\transportation\Type;
use app\admin\model\pes\vehicle\city\Volumes;
use think\Model;


class Models extends Model
{

    

    

    // 表名
    protected $name = 'pes_vehicle_models';
    
    // 自动写入时间戳字段
    protected $autoWriteTimestamp = 'int';

    // 定义时间戳字段名
    protected $createTime = 'createtime';
    protected $updateTime = 'updatetime';
    protected $deleteTime = false;

    // 追加属性
    protected $append = [

    ];
    public function getStatusList(): array
    {
        return ['0' => __('禁用'),'1'=>__('正常')];
    }
    public function cityVolumes()
    {
        return $this->hasMany(Volumes::class, 'vehicle_model_id');
    }
    public function transportationType()
    {
        return $this->belongsTo(Type::class, 'transportation_type_id');
    }
    







}
